#include<bits/stdc++.h>
#define int long long
using namespace std;
namespace IO
{
	char buff[1<<21],*p1=buff,*p2=buff;
	char getch(){return p1==p2&&(p2=((p1=buff)+fread(buff,1,1<<21,stdin)),p1==p2)?EOF:*p1++;}
	template<typename T>void read(T &x){char ch=getch();int fl=1;x=0;while(ch>'9'||ch<'0'){if(ch=='-')fl=-1;ch=getch();}while(ch<='9'&&ch>='0'){x=x*10+ch-48;ch=getch();}x*=fl;}
	template<typename T>void read_s(T &x){x="";char ch=getch();while(ch<'a'||ch>'z')ch=getch();while(ch>='a'&&ch<='z'){x+=ch;ch=getch();}}
	template<typename T,typename ...Args>void read(T &x,Args& ...args){read(x);read(args...);}
	char obuf[1<<21],*p3=obuf;
	void putch(char ch) {if(p3-obuf<(1<<21))*p3++=ch;else fwrite(obuf,p3-obuf,1,stdout),p3=obuf,*p3++=ch;}
	char ch[100];
	template<typename T>void write(T x) {if(!x)return putch('0');if(x<0)putch('-'),x*=-1;int top=0;while(x)ch[++top]=x%10+48,x/=10;while(top)putch(ch[top]),top--;}
	template<typename T,typename ...Args>void write(T x,Args ...args) {write(x);write(args...);}
	void put(string s){for(int i=0;i<s.size();i++)putch(s[i]);}
	void flush(){fwrite(obuf,p3-obuf,1,stdout);}
}
using namespace IO;
struct node
{
	int nxt,to;
}e[114514<<1];
int head[114514],cnt_edge;
void add_edge(int u,int v)
{
	e[++cnt_edge].to=v;
	e[cnt_edge].nxt=head[u];
	head[u]=cnt_edge;
}
int n,m,k,q;
const int mod=998244353;
inline int ksm(int x,int p){int res=1;for(;p;p>>=1,x=x*x%mod)if(p&1)res=res*x%mod;return res;}
int a[114514];
int ans;
int vis[10],c[114514];
void dfs(int st)
{
	if(st>n)
	{
		memset(vis,0,sizeof vis);int res=0,f=1;
		for(int i=1;i<=n;i++)
		{
			for(int j=head[i];j;j=e[j].nxt)
				if(c[e[j].to]==c[i]) f=0;
			if(!vis[c[i]]&&a[i]) ++res,vis[c[i]]=1; 
		}
		if(f) ans=(ans+ksm(res,k))%mod;
		return;
	}
	for(int i=1;i<=m;i++) c[st]=i,dfs(st+1);
}
signed main()
{
	freopen("tree.in","r",stdin);
	freopen("tree.out","w",stdout);
	read(n,m,k,q);
	for(int i=1;i<=q;i++)
	{
		int x;read(x);
		a[x]=1;
	}
	for(int i=1;i<n;i++)
	{
		int u,v;read(u,v);
		add_edge(u,v);add_edge(v,u);
	}
	dfs(1);
	write(ans);
	flush();
	return 0;
}
